<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Login</title>
        <h:outputStylesheet name="./css/default.css"/>
    </h:head>
    <h:body>
        <h:form id="login-form">
            <p:growl id="_msgs" showDetail="true" />
            <p:panel id="login-panel" header="#{jsfmsgs.login_header}" style="margin-bottom: 20px" styleClass="customPanel">
                <h:panelGrid columns="2" cellpadding="8">
                    <h:outputLabel value="#{jsfmsgs.login_user_label}" for="username" />
                    <p:inputText id="username" value="#{loginBean.username}" required="true" label="Usuario" requiredMessage="#{jsfmsgs.login_user_required}" >
                        <f:validateLength minimum="5" />
                    </p:inputText>
                    <h:outputLabel value="#{jsfmsgs.login_pass_label}" for="password" />
                    <p:password value="#{loginBean.password}" id="password" required="true" label="Contraseña" requiredMessage="#{jsfmsgs.login_pass_required}" />
                    <p:commandButton id="button" update="_msgs" value="#{jsfmsgs.login_button_label}" action="#{loginBean.doLogin()}"
                                     styleClass="customButton"/>
                </h:panelGrid>
            </p:panel>
        </h:form>
    </h:body>
</html>